UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eP/+RpP6CNnAvma8L799G+I1JrV3DqhWeHaVhUtAonE='
WHERE
key_id = '421320d512ba4f389cbbfc202cb9b35cec7199217a78884d423e5a763f22595e'
AND (
token = 'eP/+RpP6CNnAvma8L799G+I1JrV3DqhWeHaVhUtAonE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)