UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6A++SFCm7IzvZtlkiMvesO5QM6HcYl2zSiCmI2MPzqI=' 
WHERE 
  key_id = '473022cd3619ace05f8d7ec0974998bc32b5e5a68e32254bc01423178946f0c8' 
  AND (
    token = '6A++SFCm7IzvZtlkiMvesO5QM6HcYl2zSiCmI2MPzqI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053