UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pRH5FrJnVxXo45onTCZEIqMhLw3zHaMySQbMJuAOaPo=' 
WHERE 
  key_id = '1c770b7badf1bda757c8e7f685512b5256585d2ba15a1447c40c433ff729e09f' 
  AND (
    token = 'pRH5FrJnVxXo45onTCZEIqMhLw3zHaMySQbMJuAOaPo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016