UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hBrOFjkSsW6RhAee58yt+JDzvli4+S/23wYRLTio5/E='
WHERE
key_id = '8e92559474ae5de0085f969b5df69f05087a5b3ef2cda70697b1ed7a1e248bb4'
AND (
token = 'hBrOFjkSsW6RhAee58yt+JDzvli4+S/23wYRLTio5/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)