UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zcrJhju8Ao/FE7ioiMAngcg4siL92hsRqDrcgn/4aTE='
WHERE
key_id = 'a1b32434b97db3113d25c768625f7ac522398e960ba9ec214dda674a6975b0ad'
AND (
token = 'zcrJhju8Ao/FE7ioiMAngcg4siL92hsRqDrcgn/4aTE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)