UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'I/rjkHXPRI15++yPHrfiZ1NFjOgoTfdhlvr2fjPR/18='
WHERE
key_id = '5be7d854c29873ce54c4c150ae91c6d5418ac7b58de6ab0df81ec22fef3921b2'
AND (
token = 'I/rjkHXPRI15++yPHrfiZ1NFjOgoTfdhlvr2fjPR/18='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)