UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qaBo9U99UDgaYzQUMGYLihc1hDU8My/vssIOifJlT+k=' 
WHERE 
  key_id = '41dcf18c948e8e4bdc0703a735864abe5662da40549a35256e78cf8a9ec5a49d' 
  AND (
    token = 'qaBo9U99UDgaYzQUMGYLihc1hDU8My/vssIOifJlT+k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038