UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rF1J7P3E6Wq2s9E+6hwfsa2fvXOMI/yRkDS9qHKOlpo='
WHERE
key_id = '2e87becd1a9dd6cd79f106c769a1b0eb7b56c7e624e7840e99bc685fbc35f0d1'
AND (
token = 'rF1J7P3E6Wq2s9E+6hwfsa2fvXOMI/yRkDS9qHKOlpo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)