UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RKFNXHWaNpYivGR5vT6syMyVOtKaMusTz8TUfOypiFc='
WHERE
key_id = 'c28b14bde1542fea8491d482c3aa267636e4c3d6dce7bd5c6ab5f9b3fef2cd19'
AND (
token = 'RKFNXHWaNpYivGR5vT6syMyVOtKaMusTz8TUfOypiFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)