UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/+vfqmeg20p64AWfA4EtiYmNWOCNMazn3BkP6FgsQ1E=' 
WHERE 
  key_id = '5707834c00f837676848edacc41a9e8cc9d28ca5117b4b9f769211c6fc7ab39c' 
  AND (
    token = '/+vfqmeg20p64AWfA4EtiYmNWOCNMazn3BkP6FgsQ1E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048