UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2JxWK6UmKKjRISdOCCoyc0lr6PvYK8875rRHRv70AHg=' 
WHERE 
  key_id = '2a72f215167477f4e8298aa692eb1600d95ad7fae059198f473fabbfef0e11b5' 
  AND (
    token = '2JxWK6UmKKjRISdOCCoyc0lr6PvYK8875rRHRv70AHg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034