UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bONYAbhs+sgIId1/DugeXYDHARMpnFjCMIHxwTof0Bg='
WHERE
key_id = '33bb07abebc3f1efd246b4cc3410326671f3cc70e337bba46465456efcf8ca2f'
AND (
token = 'bONYAbhs+sgIId1/DugeXYDHARMpnFjCMIHxwTof0Bg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)