UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+scaPOV2etxzJ06OWSiroEIo0UKM3mza2LpR9opH6rQ='
WHERE
key_id = 'ec6b7483ee8a0d5c0533f71308a63a02316c3d45bc4ddb7cd263367793703955'
AND (
token = '+scaPOV2etxzJ06OWSiroEIo0UKM3mza2LpR9opH6rQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)