UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PCQ/EEOjJV6f23xF2yCJixQ+q9gImM8e1Qn5+44BVWo='
WHERE
key_id = '15eedc4853b6e7fbb65b5573ca72bdfd21475cbad987c7f6712f6eec49e0e086'
AND (
token = 'PCQ/EEOjJV6f23xF2yCJixQ+q9gImM8e1Qn5+44BVWo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)