UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CHmh/hiNj4d0W/GRKUf9IJu6Dl9WlRS+wKCekjIoH5c='
WHERE
key_id = '4a51ce2c7ddef0549b88f31b5d691c17d54ae61da2b99eba118d8346c0cfa805'
AND (
token = 'CHmh/hiNj4d0W/GRKUf9IJu6Dl9WlRS+wKCekjIoH5c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)