UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rCT+VcmxprYxA/xkXforqsPDI9AN+sVV7wvM0kHCQDg=' 
WHERE 
  key_id = '37889866efe56f344cf1249bb3a53a4c15110fc87dea74412d65bd8471a023fd' 
  AND (
    token = 'rCT+VcmxprYxA/xkXforqsPDI9AN+sVV7wvM0kHCQDg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022