UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zMHu8Te10VnTxeuKreztvVnYnyyS2qqGkcuedNNELjk=' 
WHERE 
  key_id = '78fadb4cd13eac605dc41a98670ded8c206f40c0c85ab2f7976a3e0a1d0bbfd9' 
  AND (
    token = 'zMHu8Te10VnTxeuKreztvVnYnyyS2qqGkcuedNNELjk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030