UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QjJEMd7zOftLnLAB2BfR+/sY4WhwUDJObXwR47kU6fA='
WHERE
key_id = '426378a2c23d4c115d34c758207399593c62e775d3d4c3bc00e62a4f42319c35'
AND (
token = 'QjJEMd7zOftLnLAB2BfR+/sY4WhwUDJObXwR47kU6fA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)