UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UsRoWy0/hsfElB+vReSwLt3juNigYe27yJ32MggT6/Q='
WHERE
key_id = '056663923d93321f9a419d5386dd0881e5d223c08b25f92e1b3b2af858955f6b'
AND (
token = 'UsRoWy0/hsfElB+vReSwLt3juNigYe27yJ32MggT6/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)