UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eF43TzeIseWysWfvKAoDRQjM+BKOoba+EP0tBmSExe8='
WHERE
key_id = 'cb930b283daec6a419f2e9970f544b6f5d27ed5cc53cbf030a02e70f7b707b75'
AND (
token = 'eF43TzeIseWysWfvKAoDRQjM+BKOoba+EP0tBmSExe8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)