UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WLWosT5UHWzCj/Kzv21+orhBaLHSlbzmiMX/prN1QoU='
WHERE
key_id = '13701f26f86caa663fbc4df73cc6f90c6f06ffc4c81e7b5985e242b75f877e90'
AND (
token = 'WLWosT5UHWzCj/Kzv21+orhBaLHSlbzmiMX/prN1QoU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)