UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yet5ALqYiiyFFKna7onKb8JN8VTvJ8rrrdBU0bwjnLA='
WHERE
key_id = '2df75f0e0d917fcbd657223c927d14c7d0dfb75f2d1afe67f9e6a60f3ab86de1'
AND (
token = 'Yet5ALqYiiyFFKna7onKb8JN8VTvJ8rrrdBU0bwjnLA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)