UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bGHc9jJtVv/UyZRRP21A1Hhr6ByeKsH5/auU7uIXwjM='
WHERE
key_id = '5532f75c5722abcfbe31105eefacbff1ffafdbfcfdd9fd326f34edb2bf6b790f'
AND (
token = 'bGHc9jJtVv/UyZRRP21A1Hhr6ByeKsH5/auU7uIXwjM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)