UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WUP9DN0ieZSizlUnkeNCMzHEyU9tk2U/T7iQELNhfYs='
WHERE
key_id = '92cccdba266125aa1bf2233be444b9d7a857e234b5396a32db24884df48d69df'
AND (
token = 'WUP9DN0ieZSizlUnkeNCMzHEyU9tk2U/T7iQELNhfYs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)