UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iFuaz+LKJoQgeCew1QbjOrHyrlt+rXSO6PqmQsZ9SK0='
WHERE
key_id = '7563ace839e75d2c52fe2560d4ab48bbca6021f59edba5b445c6234b83ba7d73'
AND (
token = 'iFuaz+LKJoQgeCew1QbjOrHyrlt+rXSO6PqmQsZ9SK0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)