UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UM0x1CdSQ+LqelIekF7fxD3Ke6itv+XBRZrr7WK5htk=' 
WHERE 
  key_id = '7944552c8dd15cc433a43490630a6883f57167964590ed044049240e89a86e83' 
  AND (
    token = 'UM0x1CdSQ+LqelIekF7fxD3Ke6itv+XBRZrr7WK5htk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050