UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AXLFegem5AtgXB5eG+NCMMJJzH9bCpqNIBiqYIsEm18='
WHERE
key_id = '615165a5d6966919eaa5376eb29294daa237e6f96f9130acc3c30bc155381134'
AND (
token = 'AXLFegem5AtgXB5eG+NCMMJJzH9bCpqNIBiqYIsEm18='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)