UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kDb4LRw+3/a8P6hWcLzSOzVo5ELPpYwFhR/2V0BSwmA=' 
WHERE 
  key_id = '6c9fc1c11c9a2aa633db471e930c1e8f68d7ddd6da8bdbc90d360ccbe33dece6' 
  AND (
    token = 'kDb4LRw+3/a8P6hWcLzSOzVo5ELPpYwFhR/2V0BSwmA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029