UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fZE8uZUVboYXcBKjjYFk6Qusd0pDgKHQVmD0iElso+8=' 
WHERE 
  key_id = '633b6a89add3eec3e64e85a146d8f72db6d785fada3398f9a2adebb908c1bbfd' 
  AND (
    token = 'fZE8uZUVboYXcBKjjYFk6Qusd0pDgKHQVmD0iElso+8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039