UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZtZp3LX9R9vHvxutyWLjJQ/vGUisyARIgMRu4g6QmA4=' 
WHERE 
  key_id = '5bd34fbe25211e902d17cef971e1111b871669b9d26adfc125f3c85dca48106b' 
  AND (
    token = 'ZtZp3LX9R9vHvxutyWLjJQ/vGUisyARIgMRu4g6QmA4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033