UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'c0h6ROXP5M52QIibx8vQflQrycCotwtJ7d1hy/hWXQQ='
WHERE
key_id = '011e05bb274e93caa14dca9e86a8002a05bff11634c76a6a5a71d0d45d13625b'
AND (
token = 'c0h6ROXP5M52QIibx8vQflQrycCotwtJ7d1hy/hWXQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)